﻿using Furion.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Furion.Application
{

    public class ValidateInput
    {
        /// <summary>
        /// 用户名
        /// </summary>
        /// <example>admin</example>
        [Required, MinLength(3)]
        public string UserName { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        /// <example>123456</example>
        [Required, MinLength(5)]
        public string UserPass { get; set; }
    }

    public class ValidateOutput
    {
        /// <summary>
        /// 用户Id
        /// </summary>
        public long Id { get; set; }


        /// <summary>
        /// 角色
        /// </summary>
        public ICollection<RoleOutput> Roles { get; set; }


        public List<PermissionOutInput> Permissions { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        [Required, MinLength(3)]
        public string UserName { get; set; }


        /// <summary>
        /// 用户名
        /// </summary>
        [Required, MinLength(3)]
        public string NickName { get; set; }


        public bool Enabled { get; set; }
    }


    public class LoginOutput
    {
        /// <summary>
        /// 用户Id
        /// </summary>
        public long Id { get; set; }

         
        /// <summary>
        /// 角色
        /// </summary>
        public ICollection<RoleOutput> Roles { get; set; }


        public List<PermissionOutInput> Permissions { get; set; }


        /// <summary>
        /// 用户名
        /// </summary>
        [Required, MinLength(3)]
        public string UserName { get; set; }

        /// <summary>
        /// Token
        /// </summary>
        public string AccessToken { get; set; }
    }

    public class RoleOutput
    {
        public int Id { get; set; }

        /// <summary>
        /// 角色名称
        /// </summary>
        public string Name { get; set; }
    }

    public class PermissionOutInput
    {
        /// <summary>
        /// 权限名称
        /// </summary>
        public string PermissionName { get; set; }


        /// <summary>
        /// 权限代码（每一个接口）
        /// </summary>
        public string PermissionCode { get; set; }


        

    }



    public class WeiXinLoginOutput
    {
        /// <summary>
        /// 用户Id
        /// </summary>
        public long Id { get; set; }

 


        /// <summary>
        /// 用户名
        /// </summary>
        [Required, MinLength(3)]
        public string UserName { get; set; }

        /// <summary>
        /// Token
        /// </summary>
        public string AccessToken { get; set; }
    }


}
